package valueobject

type CourseOption func(c *Course)

func NewCourse(opts ...CourseOption) CourseVO {
	var course Course
	for _, opt := range opts {
		opt(&course)
	}
	return &course
}

func WithCourseID(id uint) CourseOption {
	return func(c *Course) {
		c.ID = id
	}
}

func WithCourseName(name string) CourseOption {
	return func(c *Course) {
		c.Name = name
	}
}

func WithCourseDescription(description string) CourseOption {
	return func(c *Course) {
		c.Description = description
	}
}
